﻿@using WY.RMS.ViewModel.Member
@model ModuleVM
@{
    List<SelectListItem> parentList = ViewBag.ParentModuleList;
}


<link href="~/Scripts/AdminLTE2.3.0/plugins/iCheck/square/blue.css" rel="stylesheet" />
@Html.HiddenFor(t => t.Id)
<div class="form-group">
    <div class="col-sm-2">
        <label style="color: red; margin-left: -8px;">*</label>@Html.LabelFor(model => model.Name, new { @class = " control-label" })
    </div>

    <div class="col-sm-8">
        @Html.TextBoxFor(model => model.Name, new { @class = "form-control" })
        @Html.ValidationMessageFor(model => model.Name)
    </div>
</div>
<div class="form-group">
    <div class="col-sm-2">
        @Html.LabelFor(model => model.ParentName, new { @class = "control-label" })
    </div>
    <div class="col-sm-8">
        @Html.DropDownListFor(model => model.ParentId, parentList, "--请选择--", new { @class = "form-control" })
        @Html.ValidationMessageFor(model => model.ParentId)
    </div>
</div>
<div class="form-group">
    <div class="col-sm-2">
        <label style="color: red; margin-left: -8px;">*</label>@Html.LabelFor(model => model.LinkUrl, new { @class = " control-label" })
    </div>
    <div class="col-sm-8">
        @Html.TextBoxFor(model => model.LinkUrl, new { @class = "form-control" })
        @Html.ValidationMessageFor(model => model.LinkUrl)
    </div>
</div>
<div class="form-group">
    <div class="col-sm-2">
        <label style="color: red; margin-left: -8px;">*</label>@Html.LabelFor(model => model.Code, new { @class = " control-label" })
    </div>

    <div class="col-sm-8">
        @Html.TextBoxFor(model => model.Code, new { @class = "form-control" })
        @Html.ValidationMessageFor(model => model.Code)
    </div>
</div>
<div class="form-group">
    <div class="col-sm-2">
        @Html.LabelFor(model => model.Description, new { @class = "control-label" })
    </div>
    <div class="col-sm-8">
        @Html.TextBoxFor(model => model.Description, new { @class = "form-control" })
        @Html.ValidationMessageFor(model => model.Description)
    </div>
</div>
<div class="form-group">
    @Html.LabelFor(model => model.IsMenu, new { @class = "col-sm-2 control-label" })
    <div class="checkbox icheck col-sm-8">
        @Html.CheckBoxFor(model => model.IsMenu, new { @class = "myCheck" })  @*增加myCheck样式为了避免表格中的checkbox失效*@
        @Html.ValidationMessageFor(model => model.IsMenu)
    </div>
</div>
<div class="form-group">
    <div class="col-sm-2">
        @Html.LabelFor(model => model.Enabled, new { @class = "control-label" })
    </div>
    <div class="checkbox icheck col-sm-8">
        @Html.CheckBoxFor(model => model.Enabled, new { @class = "myCheck" }) @*增加myCheck样式为了避免表格中的checkbox失效*@
        @Html.ValidationMessageFor(model => model.Enabled)
    </div>
</div>
<script>
    $(function () {
        $('input.myCheck').iCheck({
            checkboxClass: 'icheckbox_square-blue',
            radioClass: 'iradio_square-blue',
            increaseArea: '20%' // optional
        });
    });
</script>